package com.sunxu.spring.scope;

import com.sunxu.spring.scope.service.MessageService;

/**
 * @author 孙许
 * @date 2018-07-14
 * @description
 */
public class MessagePrinter {
    final private MessageService service;

    public MessagePrinter(MessageService service) {
        this.service = service;
    }

    public void printMessage() {
        System.out.println(this.service.getMessage());
    }

    public MessageService getService() {
        return service;
    }
}
